<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;

/**
 * Class TlAuth
 * 
 * @property int $id
 * @property int|null $bank_card_id
 * @property string|null $req_trace_num
 * @property string|null $resp_trace_num
 * @property string|null $processing_code
 * @property string|null $trans_date
 * @property string|null $sms_req_trace_num
 * @property int|null $sms_resp_trace_num
 * @property Carbon|null $create_time
 * @property Carbon|null $update_time
 * 
 * @property BankCard|null $bank_card
 * @property Collection|BankCard[] $bank_cards
 *
 * @package App\Models
 */
class TlAuth extends Model
{
    protected $table = 'tl_auth';

    protected $casts = [
        'bank_card_id' => 'int',
        'sms_resp_trace_num' => 'int'
    ];

    protected $fillable = [
        'bank_card_id',
        'req_trace_num',
        'resp_trace_num',
        'processing_code',
        'trans_date',
        'sms_req_trace_num',
        'sms_resp_trace_num'
    ];

    public function bank_card()
    {
        return $this->belongsTo(BankCard::class);
    }

    public function bank_cards()
    {
        return $this->hasMany(BankCard::class);
    }
}
